package sky.demo.persistence.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 实体类
 * @author sky
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "user")
public class User extends BaseEntity {

    String name;

    Integer age;

    String pwd;

    String account;

    List<UserRoleRel> userRoleRels;
    UserRoleRel rel;
    /**
     * @return Returns the name.
     */

    public String getName() {
        return name;
    }

    /**
     * @param name The name to set.
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return Returns the age.
     */
    @Column(name = "age")
    public Integer getAge() {
        return age;
    }

    /**
     * @param age The age to set.
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     * @return Returns the account.
     */
    public String getAccount() {
        return account;
    }

    /**
     * @param account The account to set.
     */
    public void setAccount(String account) {
        this.account = account;
    }

    /**
     * @return Returns the userRoleRels.
     */
    @OneToMany(mappedBy = "user")
    public List<UserRoleRel> getUserRoleRels() {
        return userRoleRels;
    }

    /**
     * @param userRoleRels The userRoleRels to set.
     */
    public void setUserRoleRels(List<UserRoleRel> userRoleRels) {
        this.userRoleRels = userRoleRels;
    }

    /**
     * @return Returns the pwd.
     */
    @Column(name = "pwd")
    public String getPwd() {
        return pwd;
    }

    /**
     * @param pwd The pwd to set.
     */
    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    /**
     * @return Returns the rel.
     */
    public UserRoleRel getRel() {
        return rel;
    }

    /**
     * @param rel The rel to set.
     */
    public void setRel(UserRoleRel rel) {
        this.rel = rel;
    }

}
